package com.tn.openrpc.client.event
{
	import flash.events.Event;

	public class StompClientEvent extends Event
	{

		/*============================================================================*/
		/* Public Static Properties                                                   */
		/*============================================================================*/

		public static const CLOSE:String = "stompClient.close";

		public static const ERROR:String = "stompClient.error";

		public static const MESSAGE:String = "stompClient.message";

		public static const OPEN:String = "stompClient.open";

		public static const RECEIPT:String = "stompClient.receipt";


		/*============================================================================*/
		/* Public Properties                                                          */
		/*============================================================================*/

		private var _body:Object;

		public function get body():Object
		{
			return _body;
		}

		private var _headers:Object;

		public function get headers():Object
		{
			return _headers;
		}

		/*============================================================================*/
		/* Constructor                                                                */
		/*============================================================================*/

		public function StompClientEvent(type:String, headers:Object = null, body:Object = null)
		{
			super(type);

			this._headers = headers;
			this._body = body;
		}


		/*============================================================================*/
		/* Public Functions                                                           */
		/*============================================================================*/

		override public function clone():Event
		{
			return new StompClientEvent(type, headers, body);
		}
	}
}
